{include file=member.header.html} 
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
    $('.checkall_s').click(function(){
        var if_check = $(this).attr('checked');
        $('.checkitem').each(function(){
            if(!this.disabled)
            {
                $(this).attr('checked', if_check);
            }
        });
        $('.checkall_s').attr('checked', if_check);
    });
    $('a[ectype="batchcancel"]').click(function(){
        if($('.checkitem:checked').length == 0){
            return false;
        }
        if($(this).attr('presubmit')){
            if(!eval($(this).attr('presubmit'))){
                return false;
            }
        }
        var items = '';
        $('.checkitem:checked').each(function(){
            items += this.value + ',';
        });
        items = items.substr(0, (items.length - 1));

        var uri = $(this).attr('uri');
        uri = uri + '&' + $(this).attr('name') + '=' + items;
        var id = 'seller_order_cancel_order';
        var title = $(this).attr('dialog_title') ? $(this).attr('dialog_title') : '';
        //var url = $(this).attr('uri');
        var width = '500';
        ajax_form(id, title, uri, width);
    });
	
	$('.J_Memo').hover(function(){
		$(this).children('.pop').show('fast');
	},function(){
		$(this).children('.pop').hide('fast');
	});
});
</script>
<div class="content clearfix"> {include file=member.menu.html}
	<div id="right"> {include file=member.curlocal.html}
		{include file=member.submenu.html}
		<div class="wrap">
			<div class="public_index table"> 
				
				<table>
					<tr class="line_bold">
						<th colspan="8"> <div class="search_order clearfix">
								<form method="get" class="clearfix">
									<div class="float-left"> <span class="title">{$lang.order_sn}:</span>
										<input class="text_normal" type="text" name="order_sn" value="{$query.order_sn|escape}" />
										<span class="title">{$lang.add_time}:</span>
										<input class="text_normal width2" type="text" name="add_time_from" id="add_time_from" value="{$query.add_time_from}" />
										&#8211;
										<input class="text_normal width2" id="add_time_to" type="text" name="add_time_to" value="{$query.add_time_to}" />
										<span class="title">{$lang.buyer_name}:</span>
										<input class="text_normal" type="text" name="buyer_name" value="{$query.buyer_name|escape}" />
										<input type="hidden" name="app" value="seller_order" />
										<input type="hidden" name="act" value="index" />
										<input type="hidden" name="type" value="{$type}" />
										<input type="submit" class="btn" value="{$lang.search}" />
									</div>
									<!--{if $query.buyer_name or $query.add_time_from or $query.add_time_to or $query.order_sn}--> 
									<a class="detlink" href="{url app=seller_order&type=$query.type}">{$lang.cancel_query}</a> 
									<!--{/if}-->
								</form>
							</div>
						</th>
					</tr>
					<tr class="sep-row" height="20">
						<td colspan="8"></td>
					</tr>
					<tr class="line gray">
						<th>{$lang.goods_name}</th>
						<th>{$lang.price}</th>
						<th>{$lang.quantity}</th>
						<th>{$lang.payment_name}</th>
						<th>{$lang.buyer_name}</th>
						<th>{$lang.order_amount}</th>
						<th>{$lang.order_status}</th>
						<th>{$lang.evaluation}</th>
					</tr>
					<tr class="sep-row">
						<td colspan="8"></td>
					</tr>
					
					<!--{if $orders}-->
					
					<tr class="operations">
						<th colspan="8"> <p class="position1 clearfix">
								<input type="checkbox" id="all" class="checkall"/>
								<label for="all">{$lang.checkall}</label>
								<a href="javascript:;" class="delete" ectype="batchcancel" uri="index.php?app=seller_order&act=cancel_order" name="order_id">{$lang.cancel_order}</a> </p>
							<p class="position2 clearfix"> {include file=member.page.top.html} </p>
						</th>
					</tr>
					<!-- 循环开始 --> 
					<!--{foreach from=$orders item=order name=fe_order}-->
					<tr class="sep-row">
						<td colspan="8"></td>
					</tr>
					<tr class="line-hd">
						<th colspan="8" class="clearfix"> <p class="float-left"> <input type="checkbox" value="{$order.order_id}" class="checkitem" <!--{if $order.status eq ORDER_FINISHED || $order.status eq ORDER_CANCELED}--> disabled="disabled" <!--{/if}-->/>
								<label>订单号：</label>
								{$order.order_sn}
								<label>成交时间：</label>
								{$order.add_time|date:Y-m-d H:i:s} </p>
							<div class="memo float-right J_Memo"> <a uri="index.php?app=seller_order&amp;act=add_memo&amp;order_id={$order.order_id}&ajax" dialog_width="450" dialog_title="{$lang.memo}" ectype="dialog"  dialog_id="seller_order_add_memo" id="order{$order.order_id}_action_add_memo" class="flag flag{$order.flag}" /></a>
								<p class="pop">{$order.memo}</p>
							</div>
						</th>
					</tr>
					
					<!--{foreach from=$order.order_goods item=goods name=fe_goods}-->
					<tr class="line<!--{if $smarty.foreach.fe_goods.last}--> last_line<!--{/if}-->">
						<td valign="top" class="first clearfix"><div class="pic-info float-left"> <a href="{url app=goods&id=$goods.goods_id}" target="_blank"><img src="{$goods.goods_image}" width="50" height="50" /></a> </div>
							<div class="txt-info float-left">
								<div class="txt"> <a href="{url app=goods&id=$goods.goods_id}" target="_blank">{$goods.goods_name}</a> </div>
								<!--{if $goods.specification}-->
								<p class="gray-color mt5">{$goods.specification}</p>
								<!--{/if}--> 
							</div></td>
						<td valign="top" class="align2">{$goods.price}</td>
						<td valign="top" class="align2"><strong>{$goods.quantity}</strong></td>
						<!--{if $smarty.foreach.fe_goods.first}-->
						<td valign="top" class="align2 bottom-blue" rowspan="{$order.goods_quantities}"> {$order.payment_name|escape} </td>
						<td valign="top" class="align2 bottom-blue" rowspan="{$order.goods_quantities}"><a href="{url app=message&act=send&to_id=$order.buyer_id}" target="_blank">{$order.buyer_name|escape}</a> <br />
							
							<!--{if $order.buyer_info.real_name}-->{$order.buyer_info.real_name|escape|truncate:14}<!--{else}-->----<!--{/if}--> 
							<br />
							
							<!--{if $order.buyer_info.im_qq}--> 
							<a href="http://wpa.qq.com/msgrd?V=1&amp;uin={$order.buyer_info.im_qq|escape}&amp;Site={$store.store_name|escape}&amp;Menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:{$order.buyer_info.im_qq|escape}:5" alt="QQ"></a> 
							<!--{elseif $order.buyer_info.im_aliww}--> 
							<a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid={ $order.buyer_info.im_aliww|escape:url}&site=cntaobao&s=2&charset={$charset}" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid={ $order.buyer_info.im_aliww|escape:url}&site=cntaobao&s=2&charset={$charset}" alt="Wang Wang" /></a> 
							<!--{elseif $order.buyer_info.im_msn}--> 
							<a target="_blank" href="http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee={$order.buyer_info.im_msn|escape}"><img src="http://messenger.services.live.com/users/{$order.buyer_info.im_msn|escape}/presenceimage/" alt="im_msn" /></a> 
							<!--{else}--> 
							<a target="_blank" href="{url app=message&act=send&to_id=$order.buyer_id}" class="email"></a> 
							<!--{/if}--></td>
						<td valign="top" class="align2 bottom-blue" rowspan="{$order.goods_quantities}"><strong>{$order.order_amount}</strong><br />
							<span class="gray-color">(含运费:{$order.shipping_fee})</span>
							<div class="btn-order-status"> 
								<!--//调整费用--> 
								<a href="javascript:;" uri="index.php?app=seller_order&amp;act=adjust_fee&amp;order_id={$order.order_id}&ajax" dialog_width="450" dialog_title="{$lang.adjust_fee}" ectype="dialog"  dialog_id="seller_order_adjust_fee" id="order{$order.order_id}_action_adjust_fee"{if $order.status neq ORDER_PENDING and $order.status neq ORDER_SUBMITTED} style="display:none"{/if} />{$lang.adjust_fee}</a> 
								<!--//收到货款--> 
								<a href="javascript:;" ectype="dialog" dialog_id="seller_order_received_pay" dialog_width="400" uri="index.php?app=seller_order&amp;act=received_pay&amp;order_id={$order.order_id}&ajax" dialog_title="{$lang.received_pay}" id="order{$order.order_id}_action_received_pay"{if $order.status neq ORDER_PENDING} style="display:none"{/if} />{$lang.received_pay}</a> 
								
								<!--{if $order.refund_status eq 'SUCCESS'}--> 
								
								<a href="{url app=refund&act=view&refund_id=$order.refund_id}" style="color:#096">退款成功</a> 
								
								<!--{elseif $order.refund_status eq 'CLOSED'}--> 
								
								<a href="{url app=refund&act=view&refund_id=$order.refund_id}" class="gray">退款关闭</a> 
								
								<!--{elseif $order.refund_status}--> 
								
								<a href="{url app=refund&act=view&refund_id=$order.refund_id}" style="color:#ff6600">退款中</a> 
								
								<!--{/if}--> 
							</div></td>
						<td valign="top"class="align2 bottom-blue" rowspan="{$order.goods_quantities}"><div class="btn-order-status">
								<p><span class="{if $order.status==0}gray-color{else}color4{/if}">{$order.status|modifier:order_status}</span></p>
								<!--//查看订单--> 
								<a href="{url app=seller_order&act=view&order_id=$order.order_id}" target="_blank">{$lang.view_order}</a> 
								<!--//发货--> 
								<a href="javascript:;" class="btn-order-status-shipped" ectype="dialog" dialog_title="{$lang.shipped_order}" dialog_id="seller_order_shipped" uri="index.php?app=seller_order&amp;act=shipped&amp;order_id={$order.order_id}&ajax"  dialog_width="400" id="order{$order.order_id}_action_shipped"{if $order.status neq ORDER_ACCEPTED} style="display:none"{/if} />{$lang.shipped_order}</a> 
								<!--//取消订单 不是取消和完成的订单就可以取消--> 
								<a href="javascript:;" ectype="dialog" uri="index.php?app=seller_order&amp;act=cancel_order&order_id={$order.order_id}&ajax" dialog_title="{$lang.cancel_order}" dialog_id="seller_order_cancel_order" dialog_width="400" id="order{$order.order_id}_action_cancel"{if $order.status eq ORDER_CANCELED or $order.status eq ORDER_FINISHED} style="display:none"{/if} />{$lang.cancel_order}</a> 
								<!--//确认订单--> 
								<a href="javascript:;" ectype="dialog" uri="index.php?app=seller_order&amp;act=confirm_order&amp;order_id={$order.order_id}&ajax" dialog_id="seller_order_confirm_order" dialog_title="{$lang.confirm_cod_order}"  dialog_width="400" id="order{$order.order_id}_action_confirm"{if $order.status neq ORDER_SUBMITTED} style="display:none" {/if} />{$lang.confirm_cod_order}</a> 
								<!--//完成订单--> 
								<a href="javascript:;" ectype="dialog" dialog_id="seller_order_finished"  dialog_title="{$lang.finish_order}" uri="index.php?app=seller_order&amp;act=finished&order_id={$order.order_id}&ajax" dialog_width="400"  id="order{$order.order_id}_action_finish"{if $order.payment_code neq 'cod' or $order.status neq ORDER_SHIPPED} style="display:none"{/if} />{$lang.finish_order}</a> 
								<!--//修改单号--> 
								<a href="javascript:;" ectype="dialog" dialog_title="{$lang.edit_invoice_no}" uri="index.php?app=seller_order&amp;act=shipped&amp;order_id={$order.order_id}&ajax" dialog_id="seller_order_shipped" dialog_width="400" id="order{$order.order_id}_action_edit_invoice_no"{if $order.status neq ORDER_SHIPPED} style="display:none" {/if} />{$lang.edit_invoice_no}</a> 
								<!-- psmb delivery track --> 
								<!--{if $enable_express}--> 
								<a target="_blank" class="btn1" href="{url app=order_express&amp;order_id=$order.order_id}" {if $order.status neq ORDER_SHIPPED && $order.status neq ORDER_FINISHED} style="display:none"{/if}>{$lang.view_delivery_track}</a> 
								<!--{/if}--> 
							</div></td>
						<td valign="top" width="54" class="align2 bottom-blue last" rowspan="{$order.goods_quantities}"><!--{if $order.evaluation_status}-->
							
							<p class="gray-color">{$lang.already_evaluate}</p>
							
							<!--{/if}--></td>
						<!--{/if}--> 
					</tr>
					<!--{/foreach}--> 

					<!--{/foreach}-->
					
					<tr class="sep-row">
						<td colspan="8"></td>
					</tr>
					<tr class="operations">
						<th colspan="8"> <p class="position1 clearfix">
								<input type="checkbox" id="all2" class="checkall"/>
								<label for="all2">{$lang.checkall}</label>
								<a href="javascript:;" class="delete" ectype="batchcancel" uri="index.php?app=seller_order&act=cancel_order" name="order_id">{$lang.cancel_order}</a> </p>
							<p class="position2 clearfix"> {include file=member.page.bottom.html} </p>
						</th>
					</tr>
					
					<!--{else}-->
					<tr class="sep-row"><td colspan="8"><div class="notice-word"><p>{$lang.no_records}</p></div></td></tr>
					<!--{/if}-->
					
				</table>
				
			</div>
		</div>
	</div>
</div>
<iframe id="seller_order" name="seller_order" src="about:blank" frameborder="0" width="0" height="0"></iframe>
{include file=footer.html} 